body{
    margin: 0;
   /* background: green; */
   background: #B3FFAB;  /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #12FFF7, #B3FFAB);  /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #12FFF7, #B3FFAB); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */

   /* 100vh表示当前浏览器的100%的 */
   height: 100vh;
   position: relative;

}
.container{
    width: 232px;
    height: 100px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    font-size: 0;
}
.ball{
    width: 100px;
    height: 100px;
    border: 8px solid #000;
    position: relative;
    /* 设置为行内块级元素 */
    display: inline-block;
    /* 画圆  第一个属性大于50%都是圆*/
    border-radius: 50%;
    background: honeydew;
}
.face{
    width: 70px;
    height: 30px;
    position: absolute;
    right: 0;
    top: 30px;   
}
.face::before{
    /* 伪元素必要属性 */
    content: '';
    width: 18px;
    height: 8px;
    border-radius: 50%;
    background: rgb(161, 122, 122);
    position: absolute;
    right: -8px;
    top: 20px;
}
.face::after{
    /* 伪元素必要属性 */
    content: '';
    width: 18px;
    height: 8px;
    border-radius: 50%;
    background: #c98f8f;
    position: absolute;
    left: -5px;
    top: 20px;
}
.eye{
    width: 15px;
    height: 14px;
    border-bottom: 5px solid #000;
    border-radius: 50%;
    position: absolute;
}
.eye-l{
    left: 10px;

}
.eye-r{
    right: 5px;
}
.mouth{
    width: 30px;
    height: 14px;
    border-radius: 50%;
    border-bottom: 5px solid #000;
    position: absolute;
    /* transform: translateX(50%); */
    left: 0;
    right: 0;
    margin: 0 auto;
    bottom: -5px;
    opacity: 1;
}

@keyframes close {
    0%{ transform: translate(0);}
    20%{transform: translateX(20px);}
    35%{transform: translateX(20px);}
    55%{transform: translateX(0);}
    100%{transform: translateX(0);}
}
#l-ball{
    animation: close 4s ease infinite ;
    z-index: 2;
}

@keyframes face {
    0%{transform: translate(0) rotate(0);}
    10%{transform: translate(0) rotate(0);}
    20%{transform: translateX(5px) rotateZ(-2deg);}
    28%{transform: translateX(0) rotate(0);}
    35%{transform: translateX(5px) rotate(-2deg);}
    50%{transform: translate(0) rotate(0);}
    100%{transform: translate(0) rotate(0);}
}
#l-face{
    animation: face 4s ease infinite;
}

.face-r{
    left: 0;
    top: 37px;
}
.face::before{
    width: 10px;
    height: 10px;
    right: -4px;
}
.face::after{
    width: 10px;
    height: 10px;
    left: 5px;
}

.r-eye{
    border-top: 5px solid #000;
    border-bottom: none;
}
.kiss-m{
    position: absolute;
    left: 20px;
    top: 22px;
    opacity: 0;
    animation: kiss-m 4s ease infinite ;
}
.kiss{
    width: 13px;
    height: 10px;
    border-radius: 50%;
    border-left: 5px solid #000;
}
@keyframes kiss{
    40%{ transform: translateX(0);}
    50%{transform: translateX(30px) rotate(20deg);}
    60%{transform: translateX(-33px);}
    67%{transform: translateX(-33px);}
    77%{transform: translateX(0);}

}
@keyframes kiss-m {
    0%{opacity: 0;}
    55%{opacity: 0;}
    55.1%{opacity: 1;}
    66%{opacity: 1;}
    66.1%{opacity: 0;}
    
}
#r-ball{
    animation: kiss 4s ease infinite;
}

@keyframes mouth-m {
    0%{opacity: 1;}
    55%{opacity: 1;}
    55.1%{opacity: 0;}
    66%{opacity: 0;}
    66.1%{opacity: 1;}
    
}
.mouth-r{
    animation: mouth-m 4s ease infinite;
}

